<template>
	<div>
		<Header></Header>
		<div>
			<router-view></router-view>
		</div>
		<Footer v-show="this.$route.meta.show"></Footer>
	</div>
</template>

<script>
	import Header from './components/Header/Header.vue'
	import Footer from './components/Footer/Footer.vue'
  import {mapActions} from  'vuex'
	export default {
		name: 'App',
		components: {
			Header,
			Footer
		},
    methods:{
      // ...mapActions('home', {
      // 	categoryList: 'categoryList'
      // }),
      categoryList(){
        console.log("1");
      this.$store.dispatch("home/categoryList")
      }
    },
    mounted() {
    //派发一个action||获取商品分类的三级列表的数据
    this.categoryList()
  }
	}
</script>

<style>

</style>
